<%
    String path = request.getContextPath();
    int port=request.getServerPort();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    if(port==80){
        basePath = request.getScheme()+"://"+request.getServerName()+path+"/";
    }
%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<link rel="stylesheet" href="<%=basePath%>/layui/css/layui.css" media="all">
<script src="<%=basePath%>/layui/layui.js"></script>
<script src="<%=basePath%>/myjs/comm.js"></script>
<script src="//libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<script type="text/html" id="date">

    {{config.getTime(d.createTime) }}
</script>
<script type="text/html" id="date1">

    {{config.getTime(d.createrTime) }}
</script>
<script type="text/javascript">
    function  isOver(status,startDateString,endDateString) {
        if(status=="1"){
            $("#dateString").html("活动暂未发布或已经结束");
            $("#jqqd").html("敬请期待！！！")
            $(".zhezhao").css("display","block");
            $(".ts_end").css("display","block");
            return;
        }
           
        var  startDate=convertDateFromString(startDateString);
        if(startDate.getTime()>new Date().getTime()){
            //alert("asd");
            $("#dateString").html("活动开始时间为"+startDateString);
            $("#jqqd").html("敬请期待！！！")
            $(".zhezhao").css("display","block");
            $(".ts_end").css("display","block");
            return;
        }
        var  endDate=convertDateFromString(endDateString);
        if(endDate.getTime()<new Date().getTime()){
            //alert("asd");
            $("#dateString").html("活动结束时间为"+endDateString);
            $("#jqqd").html("敬请期待下次活动！！！")
            $(".zhezhao").css("display","block");
            $(".ts_end").css("display","block");
        }
    }
    function convertDateFromString(dateString) {
        if (dateString) {
            var date = new Date(dateString.replace(/-/,"/"))
            return date;
        }
    }
    function  closePage() {
        WeixinJSBridge.invoke('closeWindow',{},function(res){

            //alert(res.err_msg);

        });
    }
</script>
